﻿<script src="../../Content/fusioncharts/FusionCharts.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
    $(function () {

        $('#btnConsultar').click(function () {
            $.ajax({
                url: '@Url.Action("GenerarTablero", "Clientes")',
                type: "POST",
                dataType: "json",
                data: { 'flag': '1' },
                success: crearGrafico1
            });
        });

        function crearGrafico1(data) {
            var myChart = new FusionCharts("../../Content/fusioncharts/Column3D.swf", "myChartId", "400", "300", "0");           
            myChart.setJSONData(data);           
            myChart.render("chartContainer");
        }
    });

// --> 
</script>
<h1>
    Tablero Clientes
</h1>
<input type="button" id="btnConsultar" name="btnConsultar" class="boton" value="Generar Tablero" />
<br />
<fieldset>   
    <legend><h2>Gr&aacute;ficos</h2></legend>
    <div id="chartContainer"></div>
</fieldset>